package study05;

class Teacher{
    String name;
    String major;
    String course;
    int workTime;
    void show(){
        System.out.println("====教师信息====");
        System.out.println("教师姓名： "+ name );
        System.out.println("专业方向： "+ major );
        System.out.println("授课课程： "+ course );
        System.out.println("工作年限： "+ workTime );
    }
}

class Student{
    String name;
    int age;
    String class1;
    String hobby;
    void show(){
        System.out.println("====学生信息====");
        System.out.println("姓名： "+ name );
        System.out.println("年龄： "+ age );
        System.out.println("班级： "+ class1 );
        System.out.println("爱好： "+ hobby );
    }
}

/**
* @author GZQ
* @Date 2023/11/5
 */

public class HomeWork {
    public static void main(String[] args) {
        Teacher th = new Teacher();
        th.name = "太乙真人";
        th.major = "软件技术";
        th.course = "java编程技术";
        th.workTime = 5;
        th.show();
        Student stu = new Student();
        stu.name = "哪吒";
        stu.age = 19;
        stu.class1 = "软件技术1班";
        stu.hobby = "打篮球";
        stu.show();
    }
}
